package com.example.designer.observer.v2;

/**
 * @author zhaoyunlong
 * @date 2020/12/24
 * @description
 */
public class Child {

    boolean cry = false;

    public void wakeUp(){
        cry = true;
        WakeUpEvent<Child> wakeUpEvent = new WakeUpEvent(this);
        wakeUpEvent.addWakeUpListener(new Father()).addWakeUpListener(new Mother())
        .doWakeUp(wakeUpEvent);
    }
}
